﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using SimpleControl;

public partial class AjaxRender : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
       // string strRes = "<div class=\"drag ui-draggable\" style=\"position: relative; \" id=\"drag1\"><span> Drag me</span> </div>";
        ////string strRes = "<div class=\"drag\"  id=\"drag1\" style=\"position: relative; left: 35px; top: 71px; \"><span id=\"\"> Drag me</span> </div>";
        ////Response.Write(strRes);

        string strName = Request.QueryString["text"];
        string strBold = Request.QueryString["bold"];
        string strItalic = Request.QueryString["italic"];
        string strUnderline = Request.QueryString["under"];

        // using Simple Control
        MyText mText = new MyText();

        mText.myText = strName;
        mText.myBold = strBold =="true";
        mText.myItalic = strItalic == "true";
        mText.myUnderline = strUnderline == "true";
        mText.myTextLength = strName.Length;
        mText.myID = Guid.NewGuid().ToString();
        string strResult = mText.GenerateHTML();

        Response.Write(strResult);


    }
}